package com.org.model;

/**
 * ProductProductImageId entity. @author MyEclipse Persistence Tools
 */

public class ProductProductImageId implements java.io.Serializable {

	// Fields

	private Product product;
	private String large;
	private String medium;
	private Integer orders;
	private String source;
	private String thumbnail;
	private String title;

	// Constructors

	/** default constructor */
	public ProductProductImageId() {
	}

	/** minimal constructor */
	public ProductProductImageId(Product product) {
		this.product = product;
	}

	/** full constructor */
	public ProductProductImageId(Product product, String large, String medium,
			Integer orders, String source, String thumbnail, String title) {
		this.product = product;
		this.large = large;
		this.medium = medium;
		this.orders = orders;
		this.source = source;
		this.thumbnail = thumbnail;
		this.title = title;
	}

	// Property accessors

	public Product getProduct() {
		return this.product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	public String getLarge() {
		return this.large;
	}

	public void setLarge(String large) {
		this.large = large;
	}

	public String getMedium() {
		return this.medium;
	}

	public void setMedium(String medium) {
		this.medium = medium;
	}

	public Integer getOrders() {
		return this.orders;
	}

	public void setOrders(Integer orders) {
		this.orders = orders;
	}

	public String getSource() {
		return this.source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public String getThumbnail() {
		return this.thumbnail;
	}

	public void setThumbnail(String thumbnail) {
		this.thumbnail = thumbnail;
	}

	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ProductProductImageId))
			return false;
		ProductProductImageId castOther = (ProductProductImageId) other;

		return ((this.getProduct() == castOther.getProduct()) || (this
				.getProduct() != null
				&& castOther.getProduct() != null && this.getProduct().equals(
				castOther.getProduct())))
				&& ((this.getLarge() == castOther.getLarge()) || (this
						.getLarge() != null
						&& castOther.getLarge() != null && this.getLarge()
						.equals(castOther.getLarge())))
				&& ((this.getMedium() == castOther.getMedium()) || (this
						.getMedium() != null
						&& castOther.getMedium() != null && this.getMedium()
						.equals(castOther.getMedium())))
				&& ((this.getOrders() == castOther.getOrders()) || (this
						.getOrders() != null
						&& castOther.getOrders() != null && this.getOrders()
						.equals(castOther.getOrders())))
				&& ((this.getSource() == castOther.getSource()) || (this
						.getSource() != null
						&& castOther.getSource() != null && this.getSource()
						.equals(castOther.getSource())))
				&& ((this.getThumbnail() == castOther.getThumbnail()) || (this
						.getThumbnail() != null
						&& castOther.getThumbnail() != null && this
						.getThumbnail().equals(castOther.getThumbnail())))
				&& ((this.getTitle() == castOther.getTitle()) || (this
						.getTitle() != null
						&& castOther.getTitle() != null && this.getTitle()
						.equals(castOther.getTitle())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getProduct() == null ? 0 : this.getProduct().hashCode());
		result = 37 * result
				+ (getLarge() == null ? 0 : this.getLarge().hashCode());
		result = 37 * result
				+ (getMedium() == null ? 0 : this.getMedium().hashCode());
		result = 37 * result
				+ (getOrders() == null ? 0 : this.getOrders().hashCode());
		result = 37 * result
				+ (getSource() == null ? 0 : this.getSource().hashCode());
		result = 37 * result
				+ (getThumbnail() == null ? 0 : this.getThumbnail().hashCode());
		result = 37 * result
				+ (getTitle() == null ? 0 : this.getTitle().hashCode());
		return result;
	}

}